<?php
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2019/4/28
 * Time: 11:27
 */
namespace app\admin\controller;
use think\Db;
use think\Request;
class Complete extends Base {

    public function index(){
        if(Request::instance()->isAjax()){
            $where['tu_status'] = 2;
            $tu_date = Db::table('up_task_user')->where($where)->column('tu_date');
            $a = array_unique($tu_date);
            sort($a);
            $res = array();
            foreach ($a as $key=>$vo){
                $aa = Db::table('up_task_user')->where('tu_date',$vo)->count();
                $res[] = $aa;
            }
            $result['date'] = $a;
            $result['value'] = $res;
            return json(['msg' => $result]);
        }
        return $this->fetch();
    }
}